<?php

/**
 *
  CREATE  TABLE IF NOT EXISTS `bayes_feature` (
  `bayes_feature_id` INT NOT NULL AUTO_INCREMENT ,
  `feature_text` VARCHAR(80) NULL ,
  `feature_count` INT NULL ,
  PRIMARY KEY (`bayes_feature_id`) ,
  UNIQUE INDEX `feature_text_UNIQUE` (`feature_text` ASC) )
ENGINE = InnoDB;
 */

class Bayes_feature_data_Model extends BayesDataTemplate
{
	
	// Table primary key and value
	protected $primary_key				= 'bayes_feature_id';

	protected $primary_val				= 'feature';


	
	
	public function increment_counter()
	{
		$this->feature_count = $this->feature_count + 1;
		$this->save();
	}
	
	public function get_total_features()
	{
		$obj = clone $this;
		$ret = $obj->where(array())->count_all();
		unset($obj);
		return $ret;
	}
	
	
}